package communication;

import java.net.SocketException;

import com.illposed.osc.OSCListener;
import com.illposed.osc.OSCMessage;
import com.illposed.osc.OSCPortIn;

@Deprecated
public class OSCReceiver {

	public void startReceiving(){
		try {
			OSCPortIn receiver = new OSCPortIn(3333);
			OSCListener listener = new OSCListener() {
				public void acceptMessage(java.util.Date time, OSCMessage message) {
					//System.out.println("Message received...");
					Object[] args = message.getArguments();
					System.out.println("X:" + args[0] + " Y:" + args[1]);
				}
			};
			receiver.addListener("/hello", listener);
			receiver.startListening();
		} catch (SocketException e) {
			e.printStackTrace();
		}
	}
	
}
